Bug 567944 – [Win32] Sorted treeview columns can be unreadable
authorCody Russell <bratsche@gnome.org>
Fri, 16 Jan 2009 16:30:18 +0000 (16:30 +0000)
committerCody Russell <bratsche@src.gnome.org>
Fri, 16 Jan 2009 16:30:18 +0000 (16:30 +0000)
2009-01-16  Cody Russell  <bratsche@gnome.org>

        Bug 567944 – [Win32] Sorted treeview columns can be unreadable

        * modules/engines/ms-windows/msw_style.c: Draw selected treeview
        cells according to treeview focus, but ignore whether it is in
        a sorted column or not.  Otherwise the intersection of a selected
        row and a sorted column looks very strange if the treeview does
        not have focus.

svn path=/trunk/; revision=22126

ChangeLog
modules/engines/ms-windows/msw_style.c

index fc82236d5a8783dc99619d53ccb3f259a8fd1214..cecd726789acc3931fc0e53abadcf9cdb778bb60 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-01-16  Cody Russell  <bratsche@gnome.org>
+
+       Bug 567944 – [Win32] Sorted treeview columns can be unreadable
+
+       * modules/engines/ms-windows/msw_style.c: Draw selected treeview
+       cells according to treeview focus, but ignore whether it is in
+       a sorted column or not.  Otherwise the intersection of a selected
+       row and a sorted column looks very strange if the treeview does
+       not have focus.
+
 2009-01-16  Daniel Elstner  <danielk@openismus.com>
 
        * modules/input/gtkimcontextmultipress.[ch]: Remove the namespace
index f1e3c996621c7521bb4d257fa9cb2bd4e610d90f..536e7b576ac8cdcb3f6ea0db93bf256b37426429 100755 (executable)
@@ -2902,7 +2902,16 @@ draw_flat_box (GtkStyle *style, GdkWindow *window,
 {
   if (detail)
     {
-      if (!strcmp (detail, "checkbutton"))
+      if (state_type == GTK_STATE_SELECTED &&
+         (!strncmp ("cell_even", detail, 9) || !strncmp ("cell_odd", detail, 8)))
+       {
+         GdkGC *gc = GTK_WIDGET_HAS_FOCUS (widget) ? style->base_gc[state_type] : style->base_gc[GTK_STATE_ACTIVE];
+
+         gdk_draw_rectangle (window, gc, TRUE, x, y, width, height);
+
+         return;
+       }
+      else if (!strcmp (detail, "checkbutton"))
        {
          if (state_type == GTK_STATE_PRELIGHT)
            {